unit bitcoin_errors;

{$mode objfpc}{$H+}

interface
uses
  Classes, SysUtils;

type
  { EMessageParseBufferOverflow is internally used to abort the
    parsing if the incoming data is corrupt (too short or wrong
    size fields) so that parsing it would read beyond the buffer
    size. The exception will be gracefully handled and not leave
    the p2p units or interrupt operation }
  EMessageParseBufferOverflow = class(Exception)
    Constructor Create;
  end;

implementation

{ EMessageParseBufferOverflow }

constructor EMessageParseBufferOverflow.Create;
begin
  inherited Create('reached end of read buffer while parsing protocol message');
end;

end.

